home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
dirut
/
snif134.zip
/
SNIF.DOC
< prev
next >
Wrap
Text File
|
1992-03-16
|
19KB
|
457 lines
---------------------------------
SNiF - The ultimate file-finder
Version 1.34
Copyright (c)1992
Written by Carl Declerck
----------------------------------
Introduction
------------
SNiF is a program that allows you to find files across one or more harddisks
(floppies). It is operated from the DOS command line and offers many options
which may affect the 'sniffing' (searching) of files.
SNiF uses a method called Dynamic Parameter Parsing (DPP) to give the user
optimum sniffing performance. This means that options may be dynamically set
from command-parameter to command-parameter, thus affecting only those actual
parameters in between!
You will find that SNiF adapts itself automagically to your personal knowledge
and experience in using the program. SNiF is as easy to operate as the DOS
"dir" command. On the other hand, it is so powerful and versatile that a BBS
sysop can do his complete daily maintenance under SNiF's control and
supervision. Its uses and possibilities are unlimited!
Running SNiF
------------
To start SNiF, you just type its name at the DOS prompt. When no parameters or
options are given, SNiF will display some cryptic information on the options
provided and their default values.
The parameters which can be passed to SNiF are file-masks and options. File-
masks are strings such as: *.BBS, BIMOD???.DOC, WIN.*, etc... any valid DOS
wildcarded name. Options are strings such as: +d, -f, "+xdir &p&m", etc...
Options provided
----------------
+aHSRA, -a
Allows you to specify an attribute mask. Only files that have these attrs
will be sniffed. Option -a disables attribute sniffing, it has the same
effect as +aHSRA (ie. all attrs on). Valid attribute-identifiers are:
H (Hidden), S (System), R (Read-only) and A (Archive). Any of these
identifiers may be combined to make up the sniffing attribute mask. The
order is of no importance.
The default is -a.
+bSTRING, -b
This option is only useful when using a logfile (see further). It allows
you to put in a commentline with the value of STRING. Note that when the
+b option is set, all logged pathnames of files sniffed will be indented
by 3 spaces, giving a neater layout. Option -b disables this indentation.
Note that when STRING equals "INFO", additional file-info will be logged
with each pathname.
The default is -b.
+c, +c1, -c
Tells SNiF to ask for confirmations before executing a given command, or
not. When just +c is used, SNiF will ask the user whether it should
execute the specified +x command. Alternatively, when +c1 is used, SNiF
displays the currently found file and prompts for a command to be entered.
This command is subject to substitution just like the +xSTRING commands.
The default is -c.
+d, -d
This option allows you to tell SNiF whether it should display the full
pathname of any file that matches the given file-mask(s), or not.
The default is +d.
+e, -e
Enables or disables the escape key whilst sniffing.
The default is +e.
+f, +f1, -f
This option allows you to tell SNiF whether it should stop searching through
the directories when a file matching the specified file-mask(s) is found.
The +f option tells SNiF it should skip to the next directory when a
matching file is found, the +f1 option tells SNiF it should stop sniffing
immediately. The -f option tells SNiF it should just continue sniffing when
matching files are found.
The default is -f.
+gSTRING, -g
Allows you to snif for files that contain the STRING sequence of
characters. This option is cumulative, this means you can specify multiple
search-strings with multiple instances of +g.
By default, searching for a STRING is case-insensitive. To make it case-
sensitive, you precede STRING by a '!'. It is also possible to insert
non-keyboard characters by giving their ASCII value in 2-digit hex-from,
preceded by a backslash (ie. \XX). To escape the backslash itself, you
simply use '\\'.
Option -g clears ALL search-strings.
The default is -g.
+iSTRING, -i
Tells SNiF to take subsequent options from a control file. STRING is the
name of the control file to be used, it defaults to SNIF.CTL. When a +i
option is issued SNiF will open the control file and use its contents as
if they were passed as parameters on the command-line. When SNiF reaches
the end of the control file, it just continues taking its parameters from
the real command-line! This option is particularly useful for passing on
variable lists of filemasks that should be sniffed for. The -i option may
be used inside a control file to stop SNiF taking options from it.
The default is -i.
+kSTRING, -k
This one allows you to specify a 'C-like' format-string for the logfile
output. For each file sniffed this string will be logged, subject to the
following substitutions:
&f full pathname (incl. filename) of the file sniffed
&p pathname only of file sniffed
&n filename only of file sniffed
&m currently active filemask
&t sniffed file's creation time
&d sniffed file's creation date
&a sniffed file's attributes
&s sniffed file's size in bytes
It is also allowed to include hex-entries (\XX) in the format-string, like-
wise to the +g option.
The +k option is one of the more advanced features of SNiF... so for normal,
standard logfile-info one might rather use the simpler +bINFO (or -bINFO)
option! Option -k disables the format-string.
The default is -k.
+lSTRING, -l
Tells SNiF whether it should log the full pathname of each matching file,
or not. STRING is the name of the logfile to be used, if it doesn't exist,
it is created, if it exists already, it is appended to. When the +l option
is used with STRING omitted, STRING defaults to SNIF.LOG. However, if a
+lSTRING option has been turned off with -l, and is later re-activited with
just +l, the old value of STRING will be re-used!
The default is -l.
+m, +m1, +m2, -m
This option is an _extremely_ powerful one; it allows you to build advanced
exceptions using any criteria that SNiF supports (ie. not only filemasks,
as +n option). Advanced exceptions are built just as you would build a set
of criteria for normal sniffing, ie. you just specify the criteria which
make up the advanced exception using the normal options...
To start building advanced exceptions, issue the +m command. Any criteria
or filemasks following this +m will be added to the advanced exception
list.
When the advanced exception list is built, and you want to activate it,
issue the +m1 command and subsequently specify the criteria and filemasks
you wish to snif for.
For example: we wish to snif all files on the current drive, except all
hidden .SYS files. This could be done with something like:
SNiF +m +aH *.sys +m1 -a *.*
We first turn on advanced exception building with +m, then specify the
criterion for hidden-attribute sniffing and the *.sys filemask. Note that
after having turned off building of advanced exceptions with +m1 (thus also
activating it!), we still need to specify -a because we want to snif every
file on the drive, not only the hidden ones! It is important to note that a
+m1 instance does NOT turn off any criteria activated for advanced
exceptions, we must do so separately!
The +m2 option is similar to +m1, except that it also sets the Hidden
attribute of all files in the advanced exception list. This may be useful
when calling programs/commands that are passed wildcard parameters.
When SNiF terminates o